﻿using Pay.DTO;
using Pay.TO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Pay.IService {
    public interface IArticleService {
        /// <summary>
        /// 获得文章列表
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        PagedResult<article_dto> GetArticles(ArticleQuery query);
        /// <summary>
        /// 获取帮助中心推荐文章
        /// </summary>
        /// <returns></returns>
        List<article_dto> GetRecommendArticles();
        /// <summary>
        /// 获取分页回复帖子
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        PagedResult<reply_article_dto> GetReplyArticles(ReplyArticleQuery query);

        /// <summary>
        /// 获取文章
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        article_dto GetArticle(long id);

        /// <summary>
        /// 添加文章
        /// </summary>
        /// <param name=""></param>
        /// <returns></returns>
        int AddArticle(article_dto dto);

        /// <summary>
        /// 修改文章 状态/置顶/加精
        /// </summary>
        /// <param name="article"></param>
        /// <returns></returns>
        int UpdateArticle(article_status article);

        /// <summary>
        /// 删除回复帖子
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        int DeleteReplyArticle(long id, long user_id);

        /// <summary>
        /// 获得APP文章列表
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        ApiPagedResult<article_dto_ex> GetArticles(AppArticleQuery query);

        /// <summary>
        /// 回复帖子
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        int ReplyArticle(reply_article_dto dto);

        /// <summary>
        /// App 发帖
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        int Save(article_model dto);

        /// <summary>
        /// App获帖子详情
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        article_dto_ex GetOneArticle(long id);

        /// <summary>
        /// 获得APP回帖列表
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        ApiPagedResult<reply_article_ex> GetReplys(ReplyArticleQuery query);

        /// <summary>
        /// 回复帖子
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        int Save(reply_article_model dto);
    } 
}
